3.60 \(\int \cos ^2(a+b x) \sin ^2(a+b x) \, dx\)

Optimal. Leaf size=46 \[ -\frac{\sin (a+b x) \cos ^3(a+b x)}{4 b}+\frac{\sin (a+b x) \cos (a+b x)}{8 b}+\frac{x}{8} \]

[Out]

x/8 + (Cos[a + b*x]*Sin[a + b*x])/(8*b) - (Cos[a + b*x]^3*Sin[a + b*x])/(4*b)

________________________________________________________________________________________

Rubi [A]  time = 0.0396221, antiderivative size = 46, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.176, Rules used = {2568, 2635, 8} \[ -\frac{\sin (a+b x) \cos ^3(a+b x)}{4 b}+\frac{\sin (a+b x) \cos (a+b x)}{8 b}+\frac{x}{8} \]

Antiderivative was successfully verified.

[In]

Int[Cos[a + b*x]^2*Sin[a + b*x]^2,x]

[Out]

x/8 + (Cos[a + b*x]*Sin[a + b*x])/(8*b) - (Cos[a + b*x]^3*Sin[a + b*x])/(4*b)

Rule 2568

Int[(cos[(e_.) + (f_.)*(x_)]*(b_.))^(n_)*((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> -Simp[(a*(b*Cos[e
+ f*x])^(n + 1)*(a*Sin[e + f*x])^(m - 1))/(b*f*(m + n)), x] + Dist[(a^2*(m - 1))/(m + n), Int[(b*Cos[e + f*x])
^n*(a*Sin[e + f*x])^(m - 2), x], x] /; FreeQ[{a, b, e, f, n}, x] && GtQ[m, 1] && NeQ[m + n, 0] && IntegersQ[2*
m, 2*n]

Rule 2635

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Sin[c + d*x])^(n - 1))/(d*n),
x] + Dist[(b^2*(n - 1))/n, Int[(b*Sin[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && Integer
Q[2*n]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int \cos ^2(a+b x) \sin ^2(a+b x) \, dx &=-\frac{\cos ^3(a+b x) \sin (a+b x)}{4 b}+\frac{1}{4} \int \cos ^2(a+b x) \, dx\\ &=\frac{\cos (a+b x) \sin (a+b x)}{8 b}-\frac{\cos ^3(a+b x) \sin (a+b x)}{4 b}+\frac{\int 1 \, dx}{8}\\ &=\frac{x}{8}+\frac{\cos (a+b x) \sin (a+b x)}{8 b}-\frac{\cos ^3(a+b x) \sin (a+b x)}{4 b}\\ \end{align*}

Mathematica [A]  time = 0.0325703, size = 23, normalized size = 0.5 \[ -\frac{\sin (4 (a+b x))-4 (a+b x)}{32 b} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[a + b*x]^2*Sin[a + b*x]^2,x]

[Out]

-(-4*(a + b*x) + Sin[4*(a + b*x)])/(32*b)

________________________________________________________________________________________

Maple [A]  time = 0.012, size = 43, normalized size = 0.9 \begin{align*}{\frac{1}{b} \left ( -{\frac{ \left ( \cos \left ( bx+a \right ) \right ) ^{3}\sin \left ( bx+a \right ) }{4}}+{\frac{\cos \left ( bx+a \right ) \sin \left ( bx+a \right ) }{8}}+{\frac{bx}{8}}+{\frac{a}{8}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(b*x+a)^2*sin(b*x+a)^2,x)

[Out]

1/b*(-1/4*cos(b*x+a)^3*sin(b*x+a)+1/8*cos(b*x+a)*sin(b*x+a)+1/8*b*x+1/8*a)

________________________________________________________________________________________

Maxima [A]  time = 0.97436, size = 32, normalized size = 0.7 \begin{align*} \frac{4 \, b x + 4 \, a - \sin \left (4 \, b x + 4 \, a\right )}{32 \, b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)^2*sin(b*x+a)^2,x, algorithm="maxima")

[Out]

1/32*(4*b*x + 4*a - sin(4*b*x + 4*a))/b

________________________________________________________________________________________

Fricas [A]  time = 1.57523, size = 84, normalized size = 1.83 \begin{align*} \frac{b x -{\left (2 \, \cos \left (b x + a\right )^{3} - \cos \left (b x + a\right )\right )} \sin \left (b x + a\right )}{8 \, b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)^2*sin(b*x+a)^2,x, algorithm="fricas")

[Out]

1/8*(b*x - (2*cos(b*x + a)^3 - cos(b*x + a))*sin(b*x + a))/b

________________________________________________________________________________________

Sympy [A]  time = 1.01716, size = 92, normalized size = 2. \begin{align*} \begin{cases} \frac{x \sin ^{4}{\left (a + b x \right )}}{8} + \frac{x \sin ^{2}{\left (a + b x \right )} \cos ^{2}{\left (a + b x \right )}}{4} + \frac{x \cos ^{4}{\left (a + b x \right )}}{8} + \frac{\sin ^{3}{\left (a + b x \right )} \cos{\left (a + b x \right )}}{8 b} - \frac{\sin{\left (a + b x \right )} \cos ^{3}{\left (a + b x \right )}}{8 b} & \text{for}\: b \neq 0 \\x \sin ^{2}{\left (a \right )} \cos ^{2}{\left (a \right )} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)**2*sin(b*x+a)**2,x)

[Out]

Piecewise((x*sin(a + b*x)**4/8 + x*sin(a + b*x)**2*cos(a + b*x)**2/4 + x*cos(a + b*x)**4/8 + sin(a + b*x)**3*c
os(a + b*x)/(8*b) - sin(a + b*x)*cos(a + b*x)**3/(8*b), Ne(b, 0)), (x*sin(a)**2*cos(a)**2, True))

________________________________________________________________________________________

Giac [A]  time = 1.15917, size = 24, normalized size = 0.52 \begin{align*} \frac{1}{8} \, x - \frac{\sin \left (4 \, b x + 4 \, a\right )}{32 \, b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)^2*sin(b*x+a)^2,x, algorithm="giac")

[Out]

1/8*x - 1/32*sin(4*b*x + 4*a)/b